package net.sx.minemodule.mvp.item;

import android.view.View;

import com.alibaba.android.arouter.launcher.ARouter;
import com.homegoods.aroutercomment.ARouterPath;
import com.homegoods.classify.model.Constant;
import com.kedll.library.mvp.BaseItem;

import net.sx.minemodule.R;
import net.sx.minemodule.mvp.bean.AfterGoodsBean;

public class AfterGoodsItem extends BaseItem<AfterGoodsBean> {
    public AfterGoodsItem(AfterGoodsBean data) {
        super(data);
    }

    @Override
    public int getLayout() {
        return R.layout.mine_item_mine_after_two;
    }

    public String getGoodsImgPath() {
        return Constant.SERVER_URL + getData().getBgimg();
    }

    public String getGoodsName() {
        return getData().getTitle();
    }

    public String getSpecification() {
        return getData().getSpecification() + " 数量：x" + getData().getNum();
    }

    public void orderClick(View view) {
        ARouter.getInstance().build(ARouterPath.PATH_MINE_ORDER_DETAIL).navigation();
    }
}
